package org.adobe.utils{
	import flash.utils.Dictionary;

	public class DictionaryUtil {
		/**
		 *	返回动态集合中键的数组
		 *
		 * 	@param d The Dictionary instance whose keys will be returned.
		 *
		 * 	@return Array of keys contained within the Dictionary
		 *
		 * 	@langversion ActionScript 3.0
		 *	@playerversion Flash 9.0
		 *	@tiptext
		 */
		public static function getKeys(d:Dictionary):Array {
			var a:Array = new Array();
			for (var key:Object in d){
				a.push(key);
			}
			return a;
		}

		/**
		 *	返回动态集合中值的数组
		 *
		 * 	@param d The Dictionary instance whose values will be returned.
		 *
		 * 	@return Array of values contained within the Dictionary
		 *
		 * 	@langversion ActionScript 3.0
		 *	@playerversion Flash 9.0
		 *	@tiptext
		 */
		public static function getValues(d:Dictionary):Array {
			var a:Array = new Array();
			for each (var value:Object in d){
				a.push(value);
			}
			return a;
		}
	}
}